import 'package:flutter_base_app/generated/json/base/json_field.dart';
import 'package:flutter_base_app/generated/json/ota_version_data.g.dart';
import 'dart:convert';
export 'package:flutter_base_app/generated/json/ota_version_data.g.dart';

@JsonSerializable()
class OtaVersionData {
  String packageVersionId = '';
  String title = '';
  int icon = 0;
  String currentVersion = '';
  int hasNewVersion = 0;
  String latestVersion = '';
  String packageSize = '';
  String packageUrl = '';
  String releaseNote = '';
  String packageFileCrc = '';

  OtaVersionData();

  factory OtaVersionData.fromJson(Map<String, dynamic> json) => $OtaVersionDataFromJson(json);

  Map<String, dynamic> toJson() => $OtaVersionDataToJson(this);

  @override
  String toString() {
    return jsonEncode(this);
  }
}
